package com.hnust.root.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.hnust.root.dao.entity.domain.OperationLog;
import com.hnust.root.dao.mapper.OperationLogMapper;
import com.hnust.root.service.inteface.OperationLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author zhusir
 * @Date 2019/2/10
 * @Desc
 */
@Service
public class OperationLogServiceImpl extends ServiceImpl<OperationLogMapper, OperationLog> implements OperationLogService {

    @Autowired
    private OperationLogMapper logMapper;

    @Override
    public IPage<OperationLog> getAllLogPage(IPage<OperationLog> page) {

        return logMapper.selectPage(page, new QueryWrapper<OperationLog>().orderByDesc("create_time"));
    }

}
